package gov.pbc.nn.kjgl.software.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import gov.pbc.nn.core.dao.AbstractHibernateDao;
import gov.pbc.nn.kjgl.entity.Project;

import org.springframework.stereotype.Repository;

@Repository
public class HldShDao extends AbstractHibernateDao {
	
	public Project getProjectById(String id){
		String hql = "from Project where id=:id";
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("id", id);
		List<Project> ls = this.query(hql, map);
		if (ls != null && !ls.isEmpty()) {
			return ls.get(0);
		}
		return null;
	}
}
